/*
* Copyright (c) 2007 by Kirill Kolodyazhniy.
* See the file "license.terms" for information on usage and redistribution.
*/

#ifndef M_DXVERTEXBUFFER_H
#define M_DXVERTEXBUFFER_H

#include "hardwarebuffer.h"
#include "comptr.h"

#include "dxheaders.h"

namespace Engine
{
	/**
	*   DirectX index buffer.
	*/
	class DXVertexBuffer: public HardWareBuffer
	{
	public:
		DXVertexBuffer(IDirect3DVertexBuffer9* vertexBuffer);

		~DXVertexBuffer();

		virtual void* Lock();

		virtual const void* Lock() const;

		virtual void UnLock()const;

		IDirect3DVertexBuffer9* GetBuffer();

	private:

		mutable ComPtr<IDirect3DVertexBuffer9> m_vertexBuffer;

	};
}

#endif
